<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/9
 * Time: 11:21
 */

class dbtools
{

    private static $conn;
    public static function setConn($conn){
        self::$conn = $conn;
    }
    public static function select($sql){
        $result =  self::$conn->query($sql);
        $data = [];
        while(true) {
            $row = $result->fetch_assoc();
            if (empty($row)) {
                break;
            }
            $data[] = $row;
        }
        return $data;
    }
    public static function add(){

    }
    public static function delete(){

    }
    public static function update()
    {

    }

}